<% include header %>
<div id="nav">
    <nav class="container nav-header">
        <div class="text-center">
            <span class="glyphicon glyphicon-chevron-left back"></span>
            <span class="title"><%= title %></span>
            <span class="glyphicon glyphicon-home home"></span>
        </div>
    </nav>
</div>
<div class="container">
    <div id="allSearch">
        <% asks.forEach(function (ask) { %>
        <div class="allSearch">
            <p><%= ask.time.second %></p>
            <h4><a href="/u/<%= ask.name %>/<%= ask.time.second %>/<%= ask.askTitle %>">标题:<%= ask.askTitle %></a></h4>
        </div>
        <% }) %>
    </div>
    <div class="empty">
        <img src="images/empty.png" alt="" height="40" class="emptyImg">
        <p class="emptyText"></p>
    </div>
</div>
<% include footer %>
<script>
    //如果没有搜到相应的内容,给于用户提示
    $(function () {
        var length = $('.allSearch').length;
        if (length == 0) {
            $('.empty').fadeIn();
            $('.emptyImg').animate({
                left: "+=100px"
            }, 1000, function () {
                $('.emptyText').html('不好意思,暂时没有您想要的内容看看别的吧!');
                $(this).fadeOut(200);
            })
        } else {
            $('.empty').css('display', 'none')
        }
    })
</script>